﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Topic.aspx.cs" Inherits="DreamBox.Admin.Posts.Topic" %>

<%@ Register src="../Controls/PagerUserControl.ascx" tagname="PagerUserControl" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
  <script type="text/javascript" src="/tools/js/jquery-1.9.1.min.js"></script>
 <link href="/style/default/css/style.css" rel="stylesheet" type="text/css" />

    <link href="/style/default/css/tb.css" rel="stylesheet" />

    <script src="/tools/myDate97/WdatePicker.js" type="text/javascript"></script>
 <style type="text/css">
        .MSelectItem{
	        background:#79c7f3;
	        background-color:#79c7f3;
        }
        .MItem
        {
            background:White;
	        background-color:White;
        }
    </style>

 <script type="text/javascript">
     //全选/反选
     function Check(che) {
         var gv = document.getElementById("tablelist");
         for (var i = 2; i < gv.rows.length; i++) {
             gv.rows[i].cells[0].getElementsByTagName("input")[0].checked = che.checked;
         }
     }
     //颜色选项
     function SelectItem(item) {
         $("#" + item.id).attr("class", "MSelectItem");
     }
     function UnSelectItem(item) {
         $("#" + item.id).attr("class", "");
     }
</script>

 
    
</head>
<body class="right_body">
    <form id="form1" runat="server">
        <table cellpadding="0" cellspacing="0" border="0" class="table table-bordered" id="tablelist">
           <tr>
                <td colspan="8" align="center">
                   	时间：
            <asp:TextBox ID="txtStartTime" runat="server" onfocus="WdatePicker()" CssClass="dfinput2"></asp:TextBox>-
            <asp:TextBox ID="txtEndTime" runat="server" onfocus="WdatePicker()" CssClass="dfinput2"></asp:TextBox>
              <asp:Button ID="btnSelect" runat="server" Text="查 询" CssClass="btn" 
                    onclick="btnSelect_Click" />

                      用户名：
            <asp:TextBox ID="txtUserName" runat="server" CssClass="dfinput2"></asp:TextBox>
           <asp:Button ID="btnSelectUserName" runat="server" Text="查 询" CssClass="btn" onclick="btnSelectUserName_Click" 
                />
                文字ID:
                    <asp:TextBox ID="txtTID" runat="server" CssClass="dfinput2"></asp:TextBox>
                    <asp:Button ID="btnTID"
                        runat="server" Text="查 询" onclick="btnTID_Click" CssClass="btn" />

                </td>
           </tr>
          <tr>
			<td colspan="8">
                <asp:LinkButton ID="LinkBtnDelete" CssClass="btn btn-link" runat="server" 
                    onclick="LinkBtnDelete_Click" OnClientClick="return confirm('确认执行删除操作?')">删除</asp:LinkButton>
                    &nbsp;&nbsp;
                 <asp:LinkButton ID="LinkBtnIsStatusTrue" CssClass="btn btn-link" runat="server" onclick="LinkBtnIsStatusTrue_Click" 
                   >锁定</asp:LinkButton>
                   &nbsp;&nbsp;
                     <asp:LinkButton ID="LinkBtnIsStatusFalse" CssClass="btn btn-link" runat="server" 
                    style="width:60px;" onclick="LinkBtnIsStatusFalse_Click" 
                   >取消锁定</asp:LinkButton>
                   &nbsp;&nbsp;
                <asp:DropDownList ID="DropProperty" runat="server" Width="90">
                </asp:DropDownList>
                <asp:LinkButton ID="LinkBtnProperty" CssClass="btn btn-link" runat="server" onclick="LinkBtnProperty_Click" 
                   >鉴定</asp:LinkButton>
            </td>
			</tr>
			<tr>
				<th>
                    <asp:CheckBox ID="BoxSelected" runat="server" onclick="Check(this)" Text="" />
               </th>
               <th>ID</th>
               <th>标题</th>
               <th>发布人</th>
               <th>发布时间</th>
               <th>浏览</th>
               <th>回帖</th>
               <th>状态</th>
               <th>操作</th>
			</tr>

                <asp:Repeater ID="RepeaterList" runat="server">
            <ItemTemplate>
			<tr onmouseover="SelectItem(this)"  onmouseout="UnSelectItem(this)" id="Item<%#Eval("PostsID") %>" >
				<td>
                    <asp:CheckBox ID="CheckBoxSelect" runat="server" ToolTip='<%#Eval("PostsID") %>' />
                </td>
                 <td>
                  <%#Eval("PostsID") %>
                </td>
                <td>
                  <%#Eval("Title") %>
                </td>
                <td>
                    <%#Eval("UserName") %>
                </td>
                <td>
                    <%#Eval("PostDate") %>
                </td>
                <td>
                    <%#Eval("BrowseCount") %>
                </td>
                <td>
                    <%#Eval("ReplyCount") %>
                </td>
                 <td>
                    <%#bool.Parse(Eval("IsStatus").ToString())==false?"锁定":"正常" %>
                </td>
                <td>
                    <a class="btn-link" href="Reply.aspx?TID=<%#Eval("PostsID") %>">回帖</a>
                </td>
			</tr>
           
            </ItemTemplate>
            </asp:Repeater>
            <tr>
                <td colspan="8" class="pager">
                    <uc1:PagerUserControl ID="PagerList" runat="server" />
                </td>
            </tr>
        </table>
   

    	
    </form>
</body>
</html>
